import java.util.Scanner;

public class Text3 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int tmp = n;
        int count = 0;
        while(tmp != 0) {
            count++;
            tmp /= 10;
        }

        while( n != 0) {
            System.out.print(n%10 + " ");
            n /= 10;
        }

    }
}
